summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-11-20 18:12:24 +0100
committert895 <clombardo169@gmail.com>2023-11-25 06:47:36 +0100
commit20de0ddf1f3afce420beebdf69ec675f0dee2b9f (patch)
treedb2c74325a3e9f1d6a07882b237d5a65da45a224
parentarm: Print backtrace on data abort (diff)
downloadyuzu-20de0ddf1f3afce420beebdf69ec675f0dee2b9f.tar
yuzu-20de0ddf1f3afce420beebdf69ec675f0dee2b9f.tar.gz
yuzu-20de0ddf1f3afce420beebdf69ec675f0dee2b9f.tar.bz2
yuzu-20de0ddf1f3afce420beebdf69ec675f0dee2b9f.tar.lz
yuzu-20de0ddf1f3afce420beebdf69ec675f0dee2b9f.tar.xz
yuzu-20de0ddf1f3afce420beebdf69ec675f0dee2b9f.tar.zst
yuzu-20de0ddf1f3afce420beebdf69ec675f0dee2b9f.zip
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt5
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt4
-rw-r--r--src/android/app/src/main/jni/native.cpp8
3 files changed, 16 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt
index f2ba2504c..e0f01127c 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt
@@ -300,6 +300,11 @@ object NativeLibrary {
external fun getPerfStats(): DoubleArray
/**
+ * Returns the current CPU backend.
+ */
+ external fun getCpuBackend(): String
+
+ /**
* Notifies the core emulation that the orientation has changed.
*/
external fun notifyOrientationChange(layout_option: Int, rotation: Int)
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
index c32fa0d7e..734c1d5ca 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
@@ -414,8 +414,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
perfStatsUpdater = {
if (emulationViewModel.emulationStarted.value) {
val perfStats = NativeLibrary.getPerfStats()
+ val cpuBackend = NativeLibrary.getCpuBackend()
if (_binding != null) {
- binding.showFpsText.text = String.format("FPS: %.1f", perfStats[FPS])
+ binding.showFpsText.text =
+ String.format("FPS: %.1f\n%s", perfStats[FPS], cpuBackend)
}
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
}
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp
index 617288ae4..ed5ce6f8a 100644
--- a/src/android/app/src/main/jni/native.cpp
+++ b/src/android/app/src/main/jni/native.cpp
@@ -694,6 +694,14 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jcl
return j_stats;
}
+jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCpuBackend(JNIEnv* env, jclass clazz) {
+ if (Settings::IsNceEnabled()) {
+ return ToJString(env, "NCE");
+ }
+
+ return ToJString(env, "JIT");
+}
+
void Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_setSysDirectory(JNIEnv* env,
jclass clazz,
jstring j_path) {}